<!DOCTYPE html>
<html>
<head>
    <script>if (window !== top) top.location.replace(location.href);</script>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link href="/images/favicon.ico" rel="icon">
    <title>授權</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <link rel="stylesheet" href="/css/style.css">
</head>
<body>
<div class="login-wrapper layui-anim layui-anim-scale layui-hide">
    <form class="layui-form" name="loginForm" method="post" action="/oauth/authorize">
        <h2 style="margin-bottom: 50px;">確認授權</h2>
        <div class="layui-form-item">
            <input type="hidden" name="user_oauth_approval" value="true">
        </div>
        <div class="layui-form-item">
            <div th:each="item:${scopes}"  style="display: none;">
                <input type="radio" th:name="'scope.'+${item}" value="true" hidden="hidden" checked="checked"/>
            </div>
        </div>
        <div class="layui-form-item">
            <button class="layui-btn layui-btn-fluid" type="submit"> 同意/授权</button>
        </div>

    </form>
</div>

<!-- js部分 -->
<script src="/layui/layui.js"></script>
<script>
    layui.use(['layer', 'form'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        $('.login-wrapper').removeClass('layui-hide');
    });
</script>
</body>
</html>